<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html >
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		
		<title>首页</title>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/res/css/common.css"/>
	    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/res/css/main.css"/>
	    <script type="text/javascript" src="${pageContext.request.contextPath }/res/js/libs/modernizr.min.js"></script>
	    
	    <script type="text/javascript" src="${pageContext.request.contextPath }/res/js/jquery-1.10.2.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath }/res/js/common.js"></script>
		
	    <style type="text/css">
	    .page li{
	    	width:35px; 
	    	float:left;
	    	margin:5px;
	    }
	    
	    .active{
	    	background: #000088;
	    }
	    
	    #hide_div{
	    	background:#003;
	    	width:100%;
	    	height:100%;
	    	border:1px solid blue ;
	    	position: fixed;
	    	top:0px;
	    	left:0px;
	    	z-index:99;
	    	opacity: 0.5;/*背景半透明*/
	    }
	    
	    #form{
	    	background: #fff;
	    	width:300px;
	    	height:300px;
	    	margin:0px auto;
	    	z-index:100;
	    	position: fixed;
	    	top:10%;
	    	left:40%;
	    	padding:20px;
	    	border-radius:10%;
	    }
	    
	    
	    </style>
	    
	    <script type="text/javascript">
	    	
	    $(function(){
	    	$("#hide_div").css("display","none");
	    	$("#form").css("display","none");
	    });
	    
	    </script>
	</head>
	<body>
	<div class="topbar-wrap white">
    <!--<div class="topbar-inner clearfix">-->
        	<div class="topbar-logo-wrap clearfix">
            	<h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">管理员中心</a></h1>
       		</div>
   		</div>
		</div>
		<div class="container clearfix">
		    <div class="sidebar-wrap">
		        <div class="sidebar-title">
		            <h1>菜单</h1>
		        </div>
		        <div class="sidebar-content">
		            <ul class="sidebar-list">
		                <li>
		                    <a href="#"><i class="icon-font">&#xe003;</i>常用操作</a>
		                    <ul class="sub-menu">
		                        <li><a href="index.jsp"><i class="icon-font">&#xe008;</i>用户管理</a></li>
		                        <li><a href="administer-公告发布.html"><i class="icon-font">&#xe005;</i>公告发布</a></li>
		                        <li><a href="administer-订单查询.html"><i class="icon-font">&#xe006;</i>订单查询</a></li>
		                    </ul>
		                </li>
		                <li>
		                    <a href="#"><i class="icon-font">&#xe018;</i>系统管理</a>
		                    <ul class="sub-menu">
		                        <li><a href="system.html"><i class="icon-font">&#xe017;</i>系统设置</a></li>
		                        <li><a href="system.html"><i class="icon-font">&#xe037;</i>清理缓存</a></li>
		                        <li><a href="system.html"><i class="icon-font">&#xe046;</i>数据备份</a></li>
		                        <li><a href="system.html"><i class="icon-font">&#xe045;</i>数据还原</a></li>
		                    </ul>
		                </li>
		            </ul>
		        </div>
		    </div>
		    <!--/sidebar-->
		    <div class="main-wrap">
		
		        <div class="crumb-wrap">
		            <div class="crumb-list"><i class="icon-font"></i><a href="index.html" color="#white">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">订单查询</span></div>
		        </div>
		        <div class="search-wrap">
		            <div class="search-content">
		                <form action="showList.action" method="post">
		                    <table class="search-tab">
		                        <tr>
		                             
		                            <th width="70">关键字:</th>
		                            <td><input class="common-text" placeholder="关键字" name="keywords" value="${keywords}" id="" type="text"></td>
		                            <td>开始</td>
		                            <td><input type="date" name="start"></td>
		                            <td>结束</td>
		                            <td><input type="date" name="end"></td>
		                            
		                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
		                        </tr>
		                    </table>
		                </form>
		            </div>
		        </div>
		        <div class="result-wrap">
		            <form name="myform" id="myform" method="post">
		                <div class="result-title">
		                    <div class="result-list">
		                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a>
		                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>
		                        
		                        <input type="button" value="增加" class="btn btn-success" onclick="showForm('')"> 
		                    </div>
		                </div>
		                <div class="result-content">
		                    <table class="result-tab" width="100%">
		                        <tr>
		                            <th class="tc" width="5%"></th>
		                            <th>标签ID</th>
		                            <th>用户名称</th>
		                            <th>用户生日</th>
		                            <th>自我介绍</th>
		                            <th>操作</th> 
		                        </tr>
		                        
		       <!-- 
		                        四个作用域			9个内置对象
		        application 	   
		        session			
		        request
		        page                
		       -->
		                        <c:forEach items="${empList }" var="emp" varStatus="st">
		                        	<tr>
			                            <td class="tc">
			                            	<input name="empId" value="${emp.empId }" type="checkbox">
			                            </td>
			                            <td>${st.count }</td> <!--标签ID-->
			                            <td>
			                            	${emp.empName }
			                            </td>
			                            <td>
			                            
			                            	<fmt:formatDate value="${emp.empBirthday }" pattern="yyyy-MM-dd"/>
			                            
			                            </td> <!--购买者用户名-->
			                            <td>${emp.empDesc}</td> <!--销售者用户名-->
			                            <td>
			                            	<a href="javascript:showForm('${emp.empId }')" class="btn btn-warning">编辑</a>
			                            	<a href="javascript:delete_rec('${emp.empId }')" class="btn btn-info">删除</a>
			                            </td>  
			                            
		                       		</tr>
		                        
		                        </c:forEach>
		                         
		                    </table>
		                    
		                    <div class="list-page">
		                    	<ul class="page">
		                    		<li ><a  href="showList.action?curPage=${pages.curPage-1 }&keywords=${keywords}">&lt;&lt;</a></li>
		                    		<c:forEach begin="1" end="${pages.totalPage }" var="c">
		                    			<c:set value="" var="cls"></c:set>
		                    			<c:if test="${c == pages.curPage }">
		                    				<c:set value="active" var="cls"></c:set>
		                    			</c:if>
		                    			<li class=${cls }><a href="showList.action?curPage=${c }&keywords=${keywords}">${c }</a></li> 
		                    		</c:forEach>
		                    		<li><a href="showList.action?curPage=${pages.curPage+1 }&keywords=${keywords}">&gt;&gt;</a></li>
		                    	</ul> 
		                    </div>
		                </div>
		            </form>
		        </div>
		    </div>
		    <!--/main-->
		</div>
		
		<!-- 遮罩层 -->
		<div id="hide_div"></div>
		
		<div  id="form">
			<div align="right">
				<a href="javascript:hideForm()">X</a>
			</div>
			<form id="userForm" action="${pageContext.request.contextPath }/emp/addOrUpdate.action" method="post">
			<input type="hidden" name="empId">
			<ul>
				<li>用户名:</li>
				<li><input type="text" name="empName" id="empName"></li> 
				<li>用户生日:</li>
				<li><input type="date" name="empBirthdayStr"></li>
				<li>用户密码:</li>
				<li><input type="password" name="empDesc"></li>
				<li>${info }</li>
				<li style="width:100%;text-align:right;"><input type="button" value="保存" class="btn" onclick="save()"></li>
				
			</ul>
			</form>
		</div>
		 
		
	</body>
</html>